/**
 * 存储登陆人信息
 */
export default {
  // 开启命名空间-避免变量名字冲突
  namespaced: true,
  // state定义成函数,避免引用问题
  state: () => ({
    profile: {
      id: '',
      avatar: '',
      nickname: '',
      account: '',
      mobile: '',
      token: '123'
    }
  }),
  mutations: {
    setToken (state, payload) {
      state.profile.token = payload
    }
  }
}
